1. Field of the Invention
The present invention relates to a digital video coding method, and more particularly, to a digital video coding method for allowing decoding to be normally performed even if a picture header, which is significant to decoding of an encoded bit stream, is lost. The present invention also relates to a digital video decoding method for decoding a bit stream which has been encoded by the encoding method. The present invention further relates to a digital video coding device and a digital video decoding device for performing the encoding method and the decoding method, respectively. This application is based on Korean Patent Application No. 99-45314 which is incorporated herein.
2. Description of the Related Art
In this specification, an H.263 standard is used as an example for explaining a conventional digital video encoding method. FIG. 1 shows the format of a field defined by the H.263 standard to explain a conventional video coding method. Referring to FIG. 1, a video bit stream which has been encoded according to the H.263 standard is composed of a plurality of picture frames. A first picture frame 1 is composed of a plurality of groups of blocks (GOBs) including a first group of blocks GOB0 and a second group of blocks GOB1. The first group of blocks GOB0 includes a picture frame start, a picture header, a GOB frame identifier (GFID) and a plurality of macroblock (MB) data. The second group of blocks GOB1 includes a GOB header, a GFID and a plurality of MB data. The second picture frame 2 and other plurality of picture frames (not shown) have the same structure as that of the first picture frame 1.
According to the H.263 standard, as a coding type changes, a field value of the GFID changes. Moreover, according to the H.263 standard, the GFID field is composed of 2 bits, and, when a part of the picture header or the entire picture header changes, a value of the GFID field of a previous frame and a value of the GFID field of a current frame are assumed to be set to different values. However, specific values that the GFID fields must be set to are not defined in the H.263 standard. In addition, according to the H.263 standard, an update full extended picture type (UFEP) field is set to xe2x80x9c001xe2x80x9d only when a corresponding picture frame includes a GFID field whose value changes. When the UFEP field is set to xe2x80x9c001xe2x80x9d, it is determined during decoding that the coding information on the corresponding picture frame has been changed.
However, according to the above conventional method, when a bit stream, which has been coded by the digital video coding method according to the H.263 standard, undergoes an error or loss under a transmission environment in which a bit error or packet loss can occur, a picture header may not be decoded. In this case, a problem may occur. In other words, it may not be recognized which picture coding information must be used for decoding a current picture frame in a decoding apparatus. In this situation, according to the conventional decoding method, a bit stream is discarded and decoding is not performed until the start of a next picture frame is found, or decoding is performed using previous picture coding information.
When discarding a bit stream until the start of a next picture frame is found and restarting decoding from the start of the found next picture frame, picture quality is seriously deteriorated. Alternately, when decoding is performed using previous picture coding information, a problem may occur if a different coding method is used for a current frame than a previous frame. Moreover, according to the conventional coding method, if the picture header information of a frame is lost when decoding a frame including an UFEP field which is set to xe2x80x9c001xe2x80x9d, it may happen that frames cannot be normally decoded until a frame including a new change is found.
To solve the above problems, it is an objective of the present invention to provide a digital video coding method for allowing the decoding of a picture frame using accurate picture header information by estimating the change in a coding type using a value of a group-of-block frame identifier (GFID) even if the picture header of the corresponding picture frame is lost.
It is another objective of the present invention to provide a digital video decoding method for decoding a bit stream which has been coded by the digital video coding method.
It is yet another objective of the present invention to provide a digital video coding device for performing the digital video coding method.
It is still yet another objective of the present invention to provide a digital video decoding device for performing the digital video decoding method.
Accordingly, to achieve the above objective, there is provided a digital video coding method including the steps of: (a) identifying what is changed in a coding type between a previous frame and a current frame; and (b) performing a predetermined bitwise logical operation with respect to a value of an indicator field of the previous frame and a bit value, wherein the bit value is determined according to the kind of change in a coding type which is identified in the step (a) and the indicator field is a predetermined field for indicating whether the coding type has been changed, and determining a result value of the logical operation as a value of an indicator field of the current frame.
Preferably, the indicator field is a group-of-block frame identifier (GFID) field which is defined by an H.263 standard, and the bitwise logical operation is an exclusive OR operation.
Preferably, the bit value has a different value according to a first case in which a rounding type changes, a second case in which an 5intra frame is changed into an inter frame or an inter frame is changed into an intra frame, and a third case in which a coding type change other than the former two cases occurs. The third case includes a change in an annex which is a detailed appendix defining an optional coding method in view of a digital video coding related standard.
Preferably, the digital video coding method also includes setting update full extended picture type (UFEP) fields, which are defined by an H.263 standard, to xe2x80x9c001xe2x80x9d, with respect to the current frame, in which the change in a coding type occurs, and a next frame, when the change in the coding type falls under the third case.
To achieve another objective, there is provided a digital video decoding method including the steps of comparing an indicator field of a previous frame and an indicator field of a current frame in the input bit stream, each indicator field being, a predetermined field for indicating whether a coding type has been changed; estimating the kind of change in the coding type by estimating a bit value, which has been used in a bitwise logical operation, based on the fact that the value of the indicator field of the current frame is obtained by performing the predetermined bitwise logical operation with respect to the value of the indicator field of the previous frame and the bit value, which is determined according to the kind of change in a coding type; and determining a decoding type for the current frame referring to a corresponding field of the previous frame, based on the estimated kind of change in the coding type.
To achieve yet another objective, there is provided a digital video coding device including a coding type change identification unit for identifying how a coding type is changed between a previous frame and a current frame and outputting bits for indicating a state of the change, and an indicator field determination unit for performing a predetermined bitwise logical operation with respect to a value of an indicator field of the previous frame and the bits, which are determined according to the kind of the identified change in a coding type, and determining a result value of the logical operation as a value of an indicator field of the current frame, each indicator field being a predetermined field for indicating whether a coding type has been changed.
To achieve still yet another objective, there is provided a digital video decoding device including a comparator for comparing an indicator field of a previous frame and an indicator field of a current frame in the input bit stream, each indicator field being a predetermined field for indicating whether a coding type has been changed; a coding type change estimator for estimating the kind of change in the coding type by estimating a bit value, which has been used in a bitwise logical operation, based on the fact that the value of the indicator field of the current frame is obtained by performing the predetermined bitwise logical operation with respect to the value of the indicator field of the previous frame and the bit value, which is determined according to the kind of change in a coding type, and for outputting a coding type change indication signal for indicating the kind of change in the coding type; and a decoding type determination unit for determining a decoding type for the current frame referring to a corresponding field of the previous frame, based on the estimated kind of change in the is coding type.